<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/wckc.css">
    <script type="text/javascript" src="__JS__/common.js"></script>
    <script type="text/javascript" src="__JS__/zui.js"></script>
    <link href="__PUBLIC__/zui/lib/uploader/zui.uploader.min.css" rel="stylesheet">
<script src="__PUBLIC__/zui/lib/uploader/zui.uploader.min.js"></script>
</block>


<block name="body">
  
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>{$meta_title}</h2>
	</div>

	    <div  class="with-padding">
                <div class="fl">
                    <a href="__ROOT__/Application/Wckc/Static/tmplfile/wckcClass.xlsx" class="btn btn-success">下载导入模板</a>&nbsp;
                    
                    <a href="{:U('addClass')}" class="btn btn-ajax btn-success btn">新增</a>&nbsp;
                    <button class="btn ajax-post btn-info btn" url="/web2016/index.php?s=/admin/Wckc/setcategorystatus.html&amp;status=1" target-form="ids">启用</button>&nbsp;
                    <button class="btn ajax-post btn-warning btn" url="/web2016/index.php?s=/admin/Wckc/setcategorystatus.html&amp;status=0" target-form="ids">禁用</button>&nbsp;
                    <button class="btn ajax-post btn-danger btn" url="/web2016/index.php?s=/admin/Wckc/setcategorystatus.html&amp;status=-1" target-form="ids">删除</button>&nbsp;

                </div>
            </div>


    <div class="with-padding">

 

  <div id="uploaderExample" class="uploader">
  <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
  <button type="button" class="btn btn-primary uploader-btn-browse"><i class="icon icon-cloud-upload"></i> 选择文件</button>
</div>
<script type="text/javascript">
$('#uploaderExample').uploader({
    
    autoUpload: true,            // 当选择文件后立即自动进行上传操作
    //url: {:U('importClass')}  // 文件上传提交地址
});
</script>


<div id='myUploader' class="uploader" data-ride="uploader" data-url="{:U('importClass')}">
  <div class="uploader-message text-center">
    <div class="content"></div>
    <button type="button" class="close">×</button>
  </div>
  <div class="uploader-files file-list file-list-lg" data-drag-placeholder="请拖拽文件到此处"></div>
  <div class="uploader-actions">
    <div class="uploader-status pull-right text-muted"></div>
    <button type="button" class="btn btn-link uploader-btn-browse" id="browse"><i class="icon icon-plus"></i> 选择文件</button>
    <button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
  </div>
</div>
<script type="text/javascript">

    // //实例化一个plupload上传对象
    // var uploader = new plupload.Uploader({
    //     browse_button : 'uploader-btn-browse', //触发文件选择对话框的按钮，为那个元素id
    //     url : 'upload.php', //服务器端的上传页面地址
    //     flash_swf_url : '__PUBLIC__/zui/lib/uploader/Moxie.swf', //swf文件，当需要使用swf方式进行上传时需要配置该参数
    //     
    // });   
var uploader = $('#myUploader').data('zui.uploader');
var options = {
    // 初始化选项
    autoUpload: true,
     browse_button : '.uploader-btn-browse',
    // flash_swf_url : '__PUBLIC__/zui/lib/uploader/Moxie.swf', //swf文件，当需要使用swf方式进行上传时需要配置该参数
    //silverlight_xap_url : 'js/Moxie.xap' //silverlight文件，当需要使用silverlight方式进行上传时需要配置该参数
};
$('#myUploader').uploader(options);
</script>      
    </div>
   
<div id="tableUploader" class="uploader">
  <div class="uploader-message text-center">
    <div class="content"></div>
    <button type="button" class="close">×</button>
  </div>
  <table class="table table-bordered">
    <thead>
      <tr>
        <th colspan="2">文件名</th>
        <th style="width: 100px">大小</th>
        <th style="width: 160px; text-align: center;">状态/操作</th>
      </tr>
    </thead>
    <tbody class="uploader-files">
      <tr class="file template">
        <td style="width: 38px; padding: 3px"><div class="file-icon"></div></td>
        <td style="padding: 0">
          <div style="position: relative; padding: 8px;">
            <strong class="file-name"></strong>
            <div class="file-progress-bar"></div>
          </div>
        </td>
        <td><span class="file-size text-muted"></span></td>
        <td class="actions text-right" style="padding: 0 4px;">
          <div class="file-status" data-toggle="tooltip" style="margin: 8px;"><i class="icon"></i> <span class="text"></span></div>
          <a data-toggle="tooltip" class="btn btn-link btn-download-file" target="_blank"><i class="icon icon-download-alt"></i></a>
          <button type="button" data-toggle="tooltip" class="btn btn-link btn-reset-file" title="Repeat"><i class="icon icon-repeat"></i></button>
          <button type="button" data-toggle="tooltip" class="btn btn-link btn-rename-file" title="Rename"><i class="icon icon-pencil"></i></button>
          <button type="button" data-toggle="tooltip" title="Remove" class="btn btn-link btn-delete-file"><i class="icon icon-trash text-danger"></i></button>
        </td>
      </tr>
    </tbody>
    <tfoot>
      <tr>
        <td colspan="4" style="padding: 4px 0">
          <div style="position: relative;">
            <div class="uploader-status pull-right text-muted" style="margin-top: 5px;"></div>
            <button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> 选择文件</button>
            <button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
          </div>
        </td>
      </tr>
    </tfoot>
  </table>
</div>
<script type="text/javascript">

    // //实例化一个plupload上传对象
    // var uploader = new plupload.Uploader({
    //     browse_button : 'uploader-btn-browse', //触发文件选择对话框的按钮，为那个元素id
    //     url : 'upload.php', //服务器端的上传页面地址
    //     flash_swf_url : '__PUBLIC__/zui/lib/uploader/Moxie.swf', //swf文件，当需要使用swf方式进行上传时需要配置该参数
    //     //silverlight_xap_url : 'js/Moxie.xap' //silverlight文件，当需要使用silverlight方式进行上传时需要配置该参数
    // });   
var uploader = $('#tableUploader').data('zui.uploader');
var options = {
    // 初始化选项
    autoUpload : true,
    //browse_button : 'uploader-btn-browse',
    browseByClickList :true,
    flash_swf_url : '__PUBLIC__/zui/lib/uploader/Moxie.swf', //swf文件，当需要使用swf方式进行上传时需要配置该参数
};
$('#tableUploader').uploader(options);
</script>  
<div class="example">
  <div id="uploaderStaticFilesExample" class="uploader file-drag-area uploader-rename uploader-custom" data-drop-placeholder="将文件拖放至在此处。">
    <div class="uploader-message text-center">
      <div class="content"></div>
      <button type="button" class="close">×</button>
    </div>
    <div class="uploader-files file-list file-list-lg file-rename-by-click file-show-delete-action-on-done" data-drag-placeholder="请拖拽文件到此处"><div class="file file-static" id="file-1517157203864002" data-status="done"><div class="file-progress-bar" style=""></div><div class="file-wrapper"><div class="file-icon" style="color: rgb(42, 173, 31);"><i class="icon icon-file-code file-icon-js" data-type="undefined" data-ext="js"></i></div><div class="content"><div class="file-name">zui.js</div><div class="file-size small text-muted">211 KB</div></div><div class="actions"><div class="file-status" data-toggle="tooltip" data-original-title="已上传" title=""><i class="icon"></i> <span class="text"></span></div><a data-toggle="tooltip" class="btn btn-link btn-download-file" target="_blank" title="" download="zui.js" data-original-title="下载" href="http://zui.sexy"><i class="icon icon-download-alt"></i></a><button type="button" data-toggle="tooltip" class="btn btn-link btn-reset-file" title="" data-original-title="重新上传"><i class="icon icon-repeat"></i></button><button type="button" data-toggle="tooltip" class="btn btn-link btn-rename-file" title="" data-original-title="重命名"><i class="icon icon-pencil"></i></button><button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-delete-file" data-original-title="移除"><i class="icon icon-trash text-danger"></i></button></div></div></div><div class="file file-static" id="file-1517157203870003" data-status="done"><div class="file-progress-bar" style=""></div><div class="file-wrapper"><div class="file-icon" style="color: rgb(173, 31, 66);"><i class="icon icon-file-code file-icon-css" data-type="undefined" data-ext="css"></i></div><div class="content"><div class="file-name">zui.css</div><div class="file-size small text-muted">104 KB</div></div><div class="actions"><div class="file-status" data-toggle="tooltip" data-original-title="已上传" title=""><i class="icon"></i> <span class="text"></span></div><a data-toggle="tooltip" class="btn btn-link btn-download-file" target="_blank" title="" download="zui.css" data-original-title="下载"><i class="icon icon-download-alt"></i></a><button type="button" data-toggle="tooltip" class="btn btn-link btn-reset-file" title="" data-original-title="重新上传"><i class="icon icon-repeat"></i></button><button type="button" data-toggle="tooltip" class="btn btn-link btn-rename-file" title="" data-original-title="重命名"><i class="icon icon-pencil"></i></button><button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-delete-file" data-original-title="移除"><i class="icon icon-trash text-danger"></i></button></div></div></div></div>
    <div class="uploader-actions">
      <div class="uploader-status pull-right text-muted"></div>
      <button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> 选择文件</button>
      <button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
    </div>
  <div class="uploader-btn-browse uploader-btn-hidden" style="z-index: 1;"></div><div id="html5_1c2e40kps1grtfnu12e91e0r1nb77_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: -1px; left: -1px; width: 1px; height: 1px; overflow: hidden; z-index: 0;"><input id="html5_1c2e40kps1grtfnu12e91e0r1nb77" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" multiple="" accept="" type="file"></div><div class="uploader-btn-browse uploader-btn-hidden" style="z-index: 1;"></div><div id="html5_1c4uprfsnq4fpoj18u1vbg19ohg_container" class="moxie-shim moxie-shim-html5" style="position: absolute; top: -1px; left: -1px; width: 1px; height: 1px; overflow: hidden; z-index: 0;"><input id="html5_1c4uprfsnq4fpoj18u1vbg19ohg" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" multiple="" accept="" type="file"></div></div>
</div>
<script>
$('#uploaderStaticFilesExample').uploader({
      chunk_size: '50kb',
      url: 'http://your/post/url',
      browse_button : 'uploader-btn-browse',
      deleteActionOnDone: function(file, doRemoveFile) {
          doRemoveFile();
      },
      staticFiles: [
          {name: 'zui.js', size: 216159, url: 'http://zui.sexy'},
          {name: 'zui.css', size: 106091}
      ]
  });

  </script>
   
</block>